def output(s):
    if(len(s)>0):
        print(s[-1],end ='')
        output(s[0:-1])

str = input("请输入一段字符串：")
output(str)